import { request } from '@ruifox-cms/utils'
//保存群组
export function saveGroup(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/cohort/save',
    method: 'post',
    data
  })
}
//分页获取群组
export function pagingGroup(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/cohort/paging',
    method: 'post',
    data
  })
}
//删除群组
export function deleteGroup(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/cohort/delete',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded', // 设置请求头
    },
    data
  })
}
//根据id查询群组
export function getByIdGroup(params) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/cohort/getById',
    method: 'get',
    params
  })
}
//添加群组成员
export function addUserGroup(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/cohort/addUser',
    method: 'post',
    data
  })
}
//删除群组成员
export function deleteUserGroup(data) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/cohort/getById',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded', // 设置请求头
    },
    data
  })
}
//查看群组成员
export function getByIdCohort(params) {
  return request({
    baseURL: "/10101_api",
    url: '/oltes/api/v1/system/cohort/getById',
    method: 'get',
    params
  })
}